package itman.elm.controller;

import itman.elm.po.User;
import itman.elm.serviece.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/UserController")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/getUserByIdByPass")
    public User getUserByIdByPass(User user){
        
        return userService.getUserByIdByPass(user);
    }
    @RequestMapping("/getUserById")
    public int getUserById(String userId){
        return userService.getUserById(userId);
    }
    @RequestMapping("/saveUser")
    public int saveUser(User user){
        System.out.println("------"+user.getUserId());
        return userService.saveUser(user);
    }

}
